// 导入模型解析构造函数
import { Application } from '@splinetool/runtime'
import { ref } from 'vue'
const showLoading = ref(false)
const ref3d = ref(null)
const init3dModel = () => {
    showLoading.value = true
    // 实例化解析器实例
    let spline = new Application(ref3d.value)
    // 拉取模型
    spline.load('https://fe-hmzs.itheima.net/scene.splinecode').then(() => {
        console.log('3D模型加载并渲染完毕')
    }).finally(() => {
        showLoading.value = false
    })
}
export function use3dModel() {
    return {
        ref3d,
        init3dModel,
        showLoading
    }
}